package basic50.fiftieth;

import java.util.Scanner;

public class Basic44 {
    public static void main(String[] args) {
       // 题目：一个偶数总能表示为两个素数之和。
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter the even number");
        int even = sc.nextInt();

        findSum(even);
    }

    private static void findSum(int even) {
        for (int i = 2; i <= even; i++) {
            if(isPrime(i) && isPrime(even -i)){
                System.out.println(i + "+" +(even-i) +"=" +even);
            }
        }
    }
    private static boolean isPrime(int i) {
        for (int j = 2; j <= Math.sqrt(i); j++) {
            if (i % j == 0) {
                return false;
            }
        }
        return true;
    }
}
